@extends('backend.template.bootstrap')
@section('content')
<div class="m-b-md">
	<h3 class="m-b-none">操作管理（{{ $operations->total() }}）</h3>
</div>
<div class="row">
	<div class="col-lg-12">
		<ul class="breadcrumb">
			<li><a href="{{ url('backend') }}"><i class="fa fa-home"></i> 首页</a></li>
			<li class="active">操作管理</li>
		</ul>
	</div>
</div>
<div class="panel panel-default">
	<header class="panel-heading">所有操作</header>
	<div class="panel panel-body">
		<div class="row">
			<div class="col-xs-11">
				{!! Form::open(array('url' => '/backend/operations', 'class' => 'form-inline', 'method' => 'get')) !!}
					<div class="form-group">
					 	{!! Form::text('action', Input::get('action'), array('class' => 'form-control', 'placeholder' => '动作')) !!}
					</div>
					<div class="form-group">
					 	{!! Form::text('content', Input::get('content'), array('class' => 'form-control', 'placeholder' => '内容')) !!}
					</div>
					<button type="submit" class="btn btn-primary">立即查找</button>
					<a class="btn btn-info" href="{{ url('/backend/operations') }}">重置</a>
				{!! Form::close() !!}
			</div>
			<div class="col-xs-1 text-right">
				{!! Form::open(array('url' => '/backend/operations/destroy-all', 'class' => 'form-inline', 'method' => 'DELETE')) !!}
					<button type="submit" class="btn btn-primary">清空</button>
				{!! Form::close() !!}
			</div>
		</div>
		<br />
		<table class="table table-striped b-t b-light table-middle">
			<thead>
				<tr>
					<th class="text-center">动作</th>
					<th class="text-center">内容</th>
					<th class="text-center">时间</th>
				</tr>
			</thead>
			<tbody>
				@foreach($operations as $operation)
				<tr>
					<td class="text-center">{{ $operation->action }}</td>
					<td>{{ $operation->content }}</td>
					<td class="text-center">{{ $operation->created_at->format('Y-m-d h:i:s') }}</td>
				</tr>
				@endforeach
			</tbody>
		</table>
		<div class="text-center">
			{!! $operations->render() !!}
		</div>
	</div>
</div>
@endsection